/**
 * @author vidy3587@gmail.com
 * @date 2021-08-21
 */
/**
 * @typedef UserInfo
 * @property {string} id
 * @property {string} name
 * */
/**
 * @description 从query 中获取userId, nickName
 * @param {any} ctx vue component
 * @return {UserInfo}
 */
export const getUserIdAndNickNameFromRouteQuery = (ctx) => {
    if (!ctx.$route) throw new Error("context has no $route property!")
    return {
        id: ctx.$route.query.id,
        name: ctx.$route.query.name,
    };
}

